<template>
	<view style="height: 500px;">7
		<ikun-qrcode
		    width="400"
		    height="400"
		    unit="rpx"
		    color="#000000"
		    :data="dataUrl"
		></ikun-qrcode>
	</view>
</template>

<script>
	import watermarkCamera from "@/components/watermark-camera/watermark-camera";
	export default {
		components: {
		  watermarkCamera
		},
		data() {
		  return {
		  imgList:[],
		  fileList:[],
		  dataUrl:"https://www.gxjiean.com:626/#/login"
		  }
		},
		onLoad() {
		
		},
		mounted() {
			// this.imgUrls  = uni.getStorageSync('imageUrls');
		},
		methods: {
			//点击拍照返回
			async clickTakePhoto(url,urlList){
				console.log('点击拍照返回：' +url.imgList);
				
			},
			//图片上传
			uploadFilePromise(url,name) {
				console.log("文件1",url)
				let _this=this
				let token = uni.getStorageSync("token");
				 uni.uploadFile({
						url:this.http.httpsLian.upload, // 仅为示例，非真实的接口地址
						filePath: url,
						header: {
							'tenant-id': 1,
							"Authorization": "Bearer "+token
						},
						name: 'file',
						success: (res) => {
							console.log("文件2",res)
							let data =JSON.parse(res.data)
							if(data.code!=0){
								setTimeout(() => {
								const num = _this.fileList.findIndex(v => v.url === url);
									_this.fileList.splice(num, 1);
								}, 500)
								uni.$u.toast("上传失败")
								return
							}
							uni.$u.toast("上传成功")
							resolve(data.data)
							
						}
					});
				
			},    
			
			


		}
	
	}
</script>

<style lang="scss" scoped>
	.bottomBg {
		width: 100%;
		height: 170rpx;
		box-sizing: border-box;
		padding: 20rpx 30rpx 40rpx;
		position: absolute;
		bottom: 0;
		left: 0;
		background-color: rgba(0, 0, 0, .8);
		display: flex;
		justify-content: space-between;
		align-items: center;
		
		.imgBox {
			width: 110rpx;
			height: 110rpx;
			float: left;
			margin-right: 40rpx;
			position: relative;
		
			.cu-tag {
				position: absolute;
				right: 0;
				top: 0;
				border-bottom-left-radius: 2px;
				padding: 3px 5px;
				height: auto;
				background-color: rgba(0, 0, 0, 0.5);
				font-size: 10px;
				vertical-align: middle;
				font-family: Helvetica Neue, Helvetica, sans-serif;
				white-space: nowrap;
				color: #ffffff;
			}
		}
		
		.imgItem {
			width: 110rpx;
			height: 110rpx;
		}
	}
.iconClose {
			width: 20rpx;
			height: 20rpx;
		}
</style>
